Skip to content

edwardpizarro-loops-fatima.js#27

Open
epizarro98 wants to merge 1 commit intoTaylorDarneille:masterfrom
epizarro98:master
Open

edwardpizarro-loops-fatima.js#27
epizarro98 wants to merge 1 commit intoTaylorDarneille:masterfrom
epizarro98:master

Conversation

@epizarro98
Copy link

Have a better understanding after today's class. Trez and Seth were a huge help as well. Will definitely need to practice more. Please see the comments under each code !


for(var i = 0; i <= 200; i+=2) { // will add plus 2
console.log(i)
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! that increment is super important!

console.log(kittens[randomChoice])
}
}
//I wasnt sure on how to get that code to print 10 times. I also had a classmate help me on this is so shout out to thst person. But for the mos part I do get whats going on.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it isn't printing 10 times because your condition tells it to print ONLY on the even-numbered loops. try adding other conditions that print things when the loop is odd!

console.log(`The current temperature is now ${currentTemp}F`)
currentTemp--
}
console.log(Math.floor(Math.random(29)))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your indentation here's a little funky. see if you can figure out how to fix it on your own!

}else {
console.log(i)//i = 0?
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

console.log(i)//i = 0?
}
}
//I did alot of research on it and found multiple ways on how to do this but this way made the most sense to be. I have a pretty good understanding with whats going on in this code. I also found it interesting seeing the different kinds of solutions.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's great! I'm glad you're really digging in and learning from others' examples, along with finding your own style 👍

@ghost
Copy link

ghost commented Sep 9, 2020

awesome job here! I can tell you really spent time on this and did your best to learn from others' code and explanations. 🥇 you're doing great! marking complete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant